﻿

"""
if <条件判断1>:
    <执行1>
elif <条件判断2>:
    <执行2>
elif <条件判断3>:
    <执行3>
else:
    <执行4>"""

age=20
if age>=18:
	print "your age is",age
	print "adut"

age=3
if age>=18:
	print "your age is",age
	print "adut"
else:
	print "your age is",age
	print "teenager"

if age>=18:
	print "adut"
elif age>=6:
	print "your age is",age
else:
	print "kid"

x=True
if x:
	print 'True'

names=['Michael','Bob','Tracy']
print "name =",names

print "for example:"
for name in names:
	print name
	
sum=0
for x in [1,2,3,4,5,6,7,8,9,10]:
	sum=sum+x
print "sum =",sum

print "range(5) =",range(5)

sum=0
for x in range(101):
	sum=sum+x
print "sum =",sum

print "while example"

sum=0
n=99
while n>0:
	sum=sum+n
	n=n-2
print "sum =",sum

